package com.wkbb.basic.thread;

import com.wkbb.basic.feign.TcCloudFeignService;
import com.wkbb.common.dto.im.ImBulkRegisterImAccountDto;
import lombok.extern.slf4j.Slf4j;

/**
 * @author yangdaofang
 * 创建时间：2020-09-08 15:12
 */
@Slf4j
public class ImBulkRegisterImAccountTask implements Runnable {


    private TcCloudFeignService tcCloudFeignService;

    private ImBulkRegisterImAccountDto imBulkRegisterImAccountDto;

    public ImBulkRegisterImAccountTask(TcCloudFeignService tcCloudFeignService, ImBulkRegisterImAccountDto imBulkRegisterImAccountDto) {
        this.tcCloudFeignService = tcCloudFeignService;
        this.imBulkRegisterImAccountDto = imBulkRegisterImAccountDto;
    }

    public ImBulkRegisterImAccountTask() {

    }

    @Override
    public void run() {
        try {
            tcCloudFeignService.bulkRegisterImAccount(imBulkRegisterImAccountDto);
        } catch (Exception e) {
            log.error("*******ImBulkRegisterImAccountTask**********", e);
        }
    }
}